//
//  TodayContent.m
//  Time
//
//  Created by dllo on 16/7/14.
//  Copyright © 2016年 司昌宝. All rights reserved.
//

#import "TodayContent.h"
#import "SCBUserinfo.h"

@implementation TodayContent

-(void)dealloc{
    [_contentId release];
    [_scbUserinfo release];
    [_scbCollinfo release];
    [_scbSonginfo release];
    [_type release];
    [_title release];
    [_coverimg release];
    [_images release];
    [_text release];
    [_tag release];
    [_tagCount release];
    [_topicUsers release];
    [_songid release];
    [_isLike release];
    [_comments release];
    [_likes release];
    [_addtime release];
    [super dealloc];
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    if ([key isEqualToString:@"id"]){
        self.contentId = value;
    }
    if ([key isEqualToString:@"userinfo"]){
        self.scbUserinfo = [[SCBUserinfo alloc] init];
        [self.scbUserinfo setValuesForKeysWithDictionary:value];
    }
    if ([key isEqualToString:@"collInfo"]){
        self.scbCollinfo = [[SCBCollinfo alloc] init];
        [self.scbCollinfo setValuesForKeysWithDictionary:value];
    }
    if ([key isEqualToString:@"songinfo"]){
        if ([value isKindOfClass:[NSDictionary class]]) {
            self.scbSonginfo = [[SCBSonginfo alloc] init];
            [self.scbSonginfo setValuesForKeysWithDictionary:value];
        }
    }
}

@end
